package com.helloworld.demo.map;

import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class HelloHashMap {
    public static void main(String[] args) {
        Map map = new HashMap();


        map.put("1","2");
        map.put("2","2");

        Iterator i$ = map.keySet().iterator();
        while (i$.hasNext()){
            String next = (String)i$.next();
            if("2".equals(next)){
                i$.remove();
            }
        }

        /*for(Object key: map.keySet()){

            if(key.equals("2")){
                map.remove("2");
            }
            //map.remove("1");

        }*/


        //System.out.println(map.get("1"));

    }
}
